<%--
  Created by IntelliJ IDEA.
  User: Master
  Date: 2021/8/26
  Time: 10:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>华瑞科技有限公司</title>
    <script src="../../js/jquery-3.5.1.min.js"></script>
    <link rel="stylesheet" href="../../css/contact.css">
    <script src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=IeQWzSo16TE3KFZWD0uaTySEhXPvj6Nx">

    </script>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
</head>
<body>
<div>
    <div class="top"><jsp:include page="top.jsp"></jsp:include></div>
    <div class="middle">
        <div class="contact_title">
            <div>\</div>
            <div>\联系我们</div>
            <div>
                <img src="../../img/conus_3ja7.png" height="182" width="482"/>
            </div>
            <div></div>
            <div></div>
        </div>
        <div id="container" class="container"></div>
        <div class="address" id="address">
            <c:forEach items="${contactData}" var="titleData">
                <span>${titleData.title}</span><br>
            </c:forEach>
        </div>
    </div>
    <div class="foot"><jsp:include page="foot.jsp"></jsp:include></div>
</div>
</body>
</html>
<script>
    var map = new BMapGL.Map('container'); // 创建Map实例
    var point = new BMapGL.Point(104.099709, 30.59816);
    map.centerAndZoom(point, 18); // 初始化地图,设置中心点坐标和地图级别
    map.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放

    var marker = new BMapGL.Marker(point, {
        enableDragging: true
    });
    map.addOverlay(marker);

    // 创建点标记
    var marker = new BMapGL.Marker(point);
    map.addOverlay(marker);
    // 创建信息窗口
    var opts = {
        width: 200,
        height: 100,
        title: '汇融创客广场'
    };
    var infoWindow = new BMapGL.InfoWindow('地址：泊寓1318', opts);
    // 点标记添加点击事件
    marker.addEventListener('click', function () {
        map.openInfoWindow(infoWindow, point); // 开启信息窗口
    });
</script>
